package command

import (
    "ginweb/internal/domain/product"
)

type ProductService struct {
    repo product.ProductRepository
}

func NewProductService(repo product.ProductRepository) *ProductService {
    return &ProductService{repo: repo}
}

func (s *ProductService) CreateProduct(product *product.Product) error {
    return s.repo.CreateProduct(product)
}

func (s *ProductService) UpdateProduct(product *product.Product) error {
    return s.repo.UpdateProduct(product)
}

func (s *ProductService) DeleteProduct(id string) error {
    return s.repo.DeleteProduct(id)
}